WORKSPACE=C:\DEV
OPERA_MINI_PATH=%WORKSPACE%\opera-mini-android-6.5
APKTOOL_PATH=%WORKSPACE%\apktool-1.4.1
AUTOSIGN_PATH=%WORKSPACE%\Auto-Sign

FileDelete, %OPERA_MINI_PATH%\dist\*.apk

if (ErrorLevel <> 0)
{
    MsgBox %ErrorLevel% could not be deleted.
    return
}

;Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
;Run, %comspec% /c dir /b > C:\list.txt && type C:\list.txt && pause, %APKTOOL_PATH%
RunWait, "%APKTOOL_PATH%/apktool.bat" b "%OPERA_MINI_PATH%", %APKTOOL_PATH%

;FileCopy, SourcePattern, DestPattern [, Flag]
FileCopy, %OPERA_MINI_PATH%/dist/Opera_Mini_6_5_Android.apk, %AUTOSIGN_PATH%/Opera-Mini-Android-6.5-mod.zip, 1

if (ErrorLevel <> 0)
{
    MsgBox %ErrorLevel% could not be copied.
    return
}

RunWait, "%AUTOSIGN_PATH%/sign.bat", %AUTOSIGN_PATH%

FileCopy, %AUTOSIGN_PATH%/your_app_signed.apk, %OPERA_MINI_PATH%/dist/Opera-Mini-Android-6.5-mod.apk, 1